<template>
  <div class="count">
    <h2>VUE计数器{{ count }}</h2>
    <button @click="add">+1</button>
    <button @click="sub">-1</button>
  </div>
</template>

<script setup>
import { ref } from "vue";
const count = ref(0);
const add = () => {
  count.value++;
};

const sub = () => {
  count.value--;
};
</script>
